﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Nodes;
using BookSourceVerification.service.impl;

namespace BookSourceVerification.service;

public abstract class UrlCheckService
{
    public abstract string GetUrl(JsonNode node);
    public abstract string GetUrl(JsonElement element);

    public static UrlCheckService GetUrlCheckService(ICheckBookSourceService checkBookSourceService)
    {
        if (checkBookSourceService is CheckSourceHttpServiceImpl)
        {
            return new UrlCheckHttpServiceImpl();
        }
        return new UrlCheckPingServiceImpl();
    }
}